package com.croot.infra.${projectFlag}.dto.response;

import com.croot.infra.${projectFlag}.adapter.rdb.po.${entityName}PO;
import java.util.Objects;
import lombok.Data;

@Data
public class ${entityName}IdRespDTO {

<#list columnInfos as column>
   <#if column.humpColumnName ?ends_with("id")>
    private String ${column.humpColumnName!};
   </#if>
</#list>

    public static ${entityName}IdRespDTO buildFromPO(${entityName}PO ${entityParamName}PO) {
        ${entityName}IdRespDTO ${entityParamName}IdRespDTO = new ${entityName}IdRespDTO();

<#list columnInfos as column>
    <#if column.humpColumnName ?ends_with("id")>
        if (Objects.nonNull(${entityParamName}PO.get${column.humpColumnName! ? cap_first}())) {
            ${entityParamName}IdRespDTO.set${column.humpColumnName! ? cap_first}(String.valueOf(${entityParamName}PO.get${column.humpColumnName! ? cap_first}()));
        }
    </#if>
</#list>

        return ${entityParamName}IdRespDTO;
    }

}
